// rank模块的小仓库
import {reqshowAirLimit, reqshowAir} from "@/api"; //引入api里面的axios
const state = {
    airInfo: [],
    airInfoLimit: []
};
const mutations = {
    GETSHOWAIR(state, airInfo) {
        state.airInfo = airInfo;
    },
    GETSHOWAIRLIMIT(state, airInfoLimit) {
        state.airInfoLimit = airInfoLimit
    }
};
const actions = {
    async getShowAir({commit}) {
        let result = await reqshowAir();
        // console.log(result)
        if (result.code == 200) {
            commit("GETSHOWAIR", result.data);
        }
    },

    async getshowAirLimit({commit}) {
        let result = await reqshowAirLimit();
        // console.log(result)
        if (result.code == 200) {
            commit("GETSHOWAIRLIMIT", result.rows);
        }
    },
};
const getters = {};
export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters,
};